//
//  NSNetCache.h
//  erhuo
//
//  Created by Jingru Nie on 14/12/31.
//  Copyright (c) 2014年 集易（北京）科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

#define CACHENOTEXIST 0
#define CACHEISFILE 1
#define CACHEISDIRECTORY 2

@interface NSNetCache : NSObject

- (id)initWithDirectory:(NSString *)dir
               FileName:(NSString *)file;

- (void)setDirectory:(NSString *)dir;
- (void)setFileName:(NSString *)file;

- (NSUInteger)cacheExist;

- (BOOL)cacheWithData:(NSData *)data
                error:(NSError **)error
             override:(BOOL)override;

- (NSString *)cachePath;

- (void)deleteCache:(NSError **)error;

@end
